package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShopCartMapper {
    /**
     * 查询当前用户人购物车
     */
    List<ShoppingCart> getUserId(Long userId);

    /**
     * 清空当前用户人购物车
     */
    void deletUserId(Long currentId);

    /**
     *到购物车里查询
     */
    ShoppingCart getBy(ShoppingCart shoppingCart);

    /**
     * 修改购物车
     */
    void update(ShoppingCart Cart);
    /**
     * 添加购物车
     */
    void insert(ShoppingCart shoppingCart);

    void sub(ShoppingCart cart);
}
